package com.example.online.music.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.online.music.mapper.DownloadRecordMapper;
import com.example.online.music.mapper.PlayRecordMapper;
import com.example.online.music.model.domain.DownloadRecord;
import com.example.online.music.model.domain.PlayRecord;
import com.example.online.music.service.DownLoadRecordService;
import com.example.online.music.service.PlayRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 播放记录业务处理类
 * @Author: yang_yong
 */
@Service
public class PlayRecordServiceImpl extends ServiceImpl<PlayRecordMapper, PlayRecord> implements PlayRecordService {

    @Autowired
    private PlayRecordMapper playRecordMapper;

    /**
     * @Description: 获取所有用户播放记录ID
     * @Author: yang_yong
     * @return: java.util.List<com.example.online.music.model.domain.PlayRecord>
     **/
    @Override
    public List<PlayRecord> getAllRecords() {
        return playRecordMapper.selectAllRecords();
    }
}
